package crs.perfiles.model;
// Generated 24-ene-2015 20:59:52 by Hibernate Tools 4.3.1

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import crs.users.model.Users;

/**
 * CrsPerfilCentro generated by hbm2java
 */
@Entity
@Table(name = "crs_perfil_centro", schema = "public")
public class CrsPerfilCentro implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int centroid;
	private CrsPerfilCentro crsPerfilCentro;
	private CrsPerfilComercial crsPerfilComercial;
	private Users users;
	private String foto;
	private String logo;
	private String paginaweb;
	private String descripcion;
	private String iban;
	private Set crsPerfilCentros = new HashSet(0);
	private Set crsCobroses = new HashSet(0);
	private Set crsPerfilEmpleados = new HashSet(0);

	public CrsPerfilCentro() {
	}

	public CrsPerfilCentro(CrsPerfilCentro crsPerfilCentro,
			CrsPerfilComercial crsPerfilComercial, Users users) {
			
		this.crsPerfilCentro = crsPerfilCentro;
		this.crsPerfilComercial = crsPerfilComercial;
		this.users = users;
	}

	public CrsPerfilCentro(CrsPerfilCentro crsPerfilCentro,
			CrsPerfilComercial crsPerfilComercial, Users users, String foto, String logo,
			String paginaweb, String descripcion, String iban, 
			Set crsPerfilCentros, Set crsCobroses, Set crsPerfilUsuarios,
			Set crsPerfilEmpleados) {
		this.crsPerfilCentro = crsPerfilCentro;
		this.crsPerfilComercial = crsPerfilComercial;
		this.users = users;
		this.foto = foto;
		this.logo = logo;
		this.paginaweb = paginaweb;
		this.descripcion = descripcion;
		this.iban = iban;
		this.crsPerfilCentros = crsPerfilCentros;
		this.crsCobroses = crsCobroses;
		this.crsPerfilEmpleados = crsPerfilEmpleados;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "users"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "centroid", unique = true, nullable = false)
	public int getCentroid() {
		return this.centroid;
	}

	public void setCentroid(int centroid) {
		this.centroid = centroid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "centrogestorid", nullable = false)
	public CrsPerfilCentro getCrsPerfilCentro() {
		return this.crsPerfilCentro;
	}

	public void setCrsPerfilCentro(CrsPerfilCentro crsPerfilCentro) {
		this.crsPerfilCentro = crsPerfilCentro;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "comercialid", nullable = false)
	public CrsPerfilComercial getCrsPerfilComercial() {
		return this.crsPerfilComercial;
	}

	public void setCrsPerfilComercial(CrsPerfilComercial crsPerfilComercial) {
		this.crsPerfilComercial = crsPerfilComercial;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public Users getUsers() {
		return this.users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	@Column(name = "foto", length = 250)
	public String getFoto() {
		return this.foto;
	}

	public void setFoto(String foto) {
		this.foto = foto;
	}

	@Column(name = "logo", length = 250)
	public String getLogo() {
		return this.logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	@Column(name = "paginaweb", length = 250)
	public String getPaginaweb() {
		return this.paginaweb;
	}

	public void setPaginaweb(String paginaweb) {
		this.paginaweb = paginaweb;
	}

	@Column(name = "descripcion", length = 3000)
	public String getDescripcion() {
		return this.descripcion;
	}

	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}
	
	@Column(name = "iban", length = 24)
	public String getIban() {
		return this.iban;
	}

	public void setIban(String iban) {
		this.iban = iban;
	}
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsPerfilCentros() {
		return this.crsPerfilCentros;
	}

	public void setCrsPerfilCentros(Set crsPerfilCentros) {
		this.crsPerfilCentros = crsPerfilCentros;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsCobroses() {
		return this.crsCobroses;
	}

	public void setCrsCobroses(Set crsCobroses) {
		this.crsCobroses = crsCobroses;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "crsPerfilCentro")
	public Set getCrsPerfilEmpleados() {
		return this.crsPerfilEmpleados;
	}

	public void setCrsPerfilEmpleados(Set crsPerfilEmpleados) {
		this.crsPerfilEmpleados = crsPerfilEmpleados;
	}



}
